1. Field of the Invention
This invention relates generally to an image compression technique, and more particularly to a technique that further reduces the size of an existing compressed file to satisfy a certain bit budget in such a way that the information discarded is minimal.
2. Description of the Related Art
The emergence of compression standards such as JPEG (an acronym for "Joint Photographic Experts Group") has led to many digital imaging systems and applications that create and maintain content only in JPEG compressed format. For instance, in most digital still-imaging cameras (DSCs) such as the Epson PhotoPC 600, Kodak DC-10, etc., pictures captured by the camera are immediately compressed within the camera and (together with the corresponding thumbnail images) are stored in the camera's storage system as JPEG files. Due to constraints within the camera, the thumbnail images (which are also in JPEG format) are constrained to be less than a particular size. Therefore, any images which exceed the size limitation imposed by the camera must be reduced.
Under the current state of the art, some camera-based image compression techniques reduce the size of captured images to meet the constraints of the camera by incorporating into the compression process a procedure that simply sets to zero some of the higher frequency coefficients regardless of their value. Higher frequency coefficients carry less important information than lower frequency coefficients. Thus, turning a high frequency coefficient to zero usually does not present a problem, except when the magnitude of that coefficient is high. In that case, important information will be lost if the high-magnitude coefficient is turned to zero.
Another proposed technique for reducing the magnitude of some quantized coefficients during compression in order to reduce compressed size is set forth in U.S. Pat. No. 5,754,696. For each block of quantized DCT coefficients in the zig-zag scan order, this technique considers two possibilities: (1) coding the coefficients as they are, and (2) reducing the magnitude of low-frequency coefficients above a threshold (i.e., coefficients occurring before a certain ordinal number in the zig-zag scan whose magnitude is above a certain threshold). For the coefficients for which such a magnitude reduction reduces the bit-rate (essentially the coefficients whose magnitude class as defined in the Huffman coding model changes as a result of magnitude reduction), the technique retains the magnitude reduction.
This is a rather inefficient technique. The lower-frequency coefficients are perceptually the most important ones, and reducing their magnitude is bound to affect the image quality adversely. Moreover, the file size reduction obtained in this technique is because of reductions in non-zero magnitude categories, which give small reductions at the expense of much quality.